var host= "http://dr.kuyuntech.com/DrAgriculture-0.1";
var url = "http://drm.kuyuntech.com/";
//获取url中的值
function getQueryString(name) { 
	var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i"); 
	var r = window.location.search.substr(1).match(reg); 
	if (r != null) return unescape(r[2]); return null; 
}

var globalApp = angular.module("globalApp",[]);

globalApp.filter("getPrice",function(){
	return function(x){
		x = x/100;
		x=Math.round(parseFloat(x)*100)/100;
		var xsd=x.toString().split(".");
		if(xsd.length==1){
		    x=x.toString()+".00";
		    return x;
		}
		if(xsd.length>1){
		    if(xsd[1].length<2){
		        x=x.toString()+"0";
		    }
		    return x;
		}
		return x;
	}
})
